<style>
</style>
<div class="fui-page">
<div class="fui-header">
		<div class="fui-header-left" ng-click="goback()">
            <a class="back"></a>
        </div>
		<div class="title">发布拼车信息</div>
		<div class="fui-header-right"></div>
</div>
<div class="fui-content">
<div class="weui_btn_area" ng-if="pagedata.op == 'main'" style="margin-top:3rem" >		
	<a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips" ng-click="access_json('/fabu/pinche/')">我要拼车</a>
	<a class="weui_btn weui_btn_f60" href="javascript:" id="showTooltips" ng-click="access_json('/fabu/daike/')">我要带客</a>
</div>	
<div class="weui_cells weui_cells_form" ng-if="pagedata.op != 'main'">	 
			<div class="weui_cell weui_vcode">
                <div class="weui_cell_hd">标题</div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" ng-model="pagedata.info.title" placeholder="请输入标题">
                </div>
            </div>			
		<div class="weui_cell">
                <div class="weui_cell_hd">出发地点</div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" ng-model="pagedata.info.start" type="text" value="" placeholder="">
                </div>
                <div class="weui_cell_ft" ng-click="tool.choose_location(pagedata.info,'start','address')">
                    <i class="icon jinyunicon icon-ditu"></i>
                </div>
		</div>
		<div class="weui_cell">
                <div class="weui_cell_hd">目的地</div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" ng-model="pagedata.info.end" type="text" value="" placeholder="">
                </div>
                <div class="weui_cell_ft" ng-click="tool.choose_location(pagedata.info,'end','address')">
                    <i class="icon jinyunicon icon-ditu"></i>
                </div>
		</div>
		<div class="weui_cell">
			<label class="weui_cell_hd">选择出发时间</label>
			<div class="weui_cell_bd weui_cell_primary">
			<input type="text" name="time" onchange="window.scope.pagedata.info.time=$(this).val()" ng-model="pagedata.info.time" placeholder="请选择日期时间" readonly="readonly" class="datetimepicker form-control" style="padding-left:12px;" />
			</div>			
		</div>
		<div class="weui_cell" ng-if="pagedata.op=='daike'">
                <div class="weui_cell_hd">价格</div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input"  type="text"  ng-model="pagedata.info.price" placeholder="请输入价格">
                </div>
         </div>
		<div class="weui_cell" ng-if="pagedata.op=='pinche'">
                <div class="weui_cell_hd">
                    是否拼座
                </div>
               <div class="weui_cell_bd weui_cell_primary">
                    <select class="weui_select" name="select"  ng-model="pagedata.info.self">
                        <option  value="1">拼座</option>
						<option  value="0">不拼座</option>
                    </select>
            </div>
        </div>
		<div class="weui_cell" ng-if="pagedata.op=='pinche'">
                <div class="weui_cell_hd">乘车人数</div>
				<div class="weui_cell_bd weui_cell_primary">
				<select class="weui_select" name="select"  ng-model="pagedata.info.people">
                        <option  value="1">1</option>
						<option  value="2">2</option>
						<option  value="3">3</option>
						<option  value="4">4</option>
						<option  value="5">5</option>
						<option  value="6">6</option>
                </select>
				 </div>
            </div>
			<div class="weui_cell weui_vcode" ng-if="pagedata.op=='daike'">
                <div class="weui_cell_hd">剩余座位</div>
				<div class="weui_cell_bd weui_cell_primary">
                <select class="weui_select" name="select"  ng-model="pagedata.info.num">
                        <option  value="1">1</option>
						<option  value="2">2</option>
						<option  value="3">3</option>
						<option  value="4">4</option>
						<option  value="5">5</option>
						<option  value="6">6</option>
                </select>
				</div>
            </div>			
			<div class="weui_cell weui_vcode">
                <div class="weui_cell_hd">联系人</div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" ng-model="pagedata.info.name" placeholder="请输入联系人">
                </div>
            </div> 
            <div class="weui_cell weui_vcode">
                <div class="weui_cell_hd">联系电话</div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input"  onkeyup="this.value=this.value.replace(/\D/g,'')" maxlength="11"  ng-model="pagedata.info.mobile" placeholder="请输入联系电话">
                </div>
            </div>
							
			<div class="weui_cell weui_vcode">
                <div class="weui_cell_hd">备注</div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" ng-model="pagedata.info.remark" placeholder="请输入详细信息">
                </div>
            </div>
</div>
<div class="weui_btn_area" ng-if="pagedata.op=='daike'">
	<a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips" ng-click="post(pagedata.info,'dodaike')">提交</a>
</div>
<div class="weui_btn_area" ng-if="pagedata.op=='pinche'">
	<a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips" ng-click="post(pagedata.info,'dopinche')">提交</a>
</div>
</div>
</div>
<div ng-include="sys_html('_menu')"></div>
<script type="text/javascript">
	require(["datetimepicker"], function(){
						$(function(){
								var option = {
									lang : "zh",
									step : 5,
									timepicker : true,
									closeOnDateSelect : true,
									format : "Y-m-d H:i"
								};
							$(".datetimepicker[name = 'time']").datetimepicker(option);
		});
	});
</script>
<script type="text/javascript">
if(!scope.main.locationaddress){
	window.scope.location(function(res){
		scope.main.lat_lng=res.lat_lng;
		scope.main.pcd=res.addressComponents;
		scope.pagedata.info.start = res.address;
		scope.main.locationaddress = res.address;
	});
}else{
	scope.pagedata.info.start = scope.main.locationaddress;
}
</script>